Skip to content

Add Nix flake for ergonomic development and reproducible builds#24872

Open
RLangendam wants to merge 1 commit into
bevyengine:mainfrom
RLangendam:main
Open

Add Nix flake for ergonomic development and reproducible builds#24872
RLangendam wants to merge 1 commit into
bevyengine:mainfrom
RLangendam:main

Conversation

@RLangendam

Copy link
Copy Markdown

Objective

  • Simplify setting up a development environment
  • Add support for reproducible builds

Solution

  • Add a nix flake and put the flake.nix under version control
  • Update the documentation to reflex the proper use of nix flakes for development

Testing

  • cargo build --all
  • cargo test --all (only the already failing tests on main continue failing)

@mockersf mockersf added X-Contentious There are nontrivial implications that should be thought through A-Build-System Related to build systems or continuous integration labels Jul 4, 2026
@mockersf

mockersf commented Jul 4, 2026

Copy link
Copy Markdown
Member

Opposed to this

@JasmineLowen

Copy link
Copy Markdown
Contributor

See #24860 for prior arguments


Nix user here, I think @mockersf has some points. WE could easily put the flake under tools/build-nix or something alike

Also:

  • the flake could also include other dev tolls like the typos bin
  • does the flake support wasm builds?
  • editing LD_LIBRARY_PATH is not recommended, using rpath is better

Otherwise I like the idea of having it in the repo since you also have a point. As a nix user it's hard to find out which dependencies are needed to compile vanilla bevy with all features enabled.

On the other hand: someone also has to maintain this, so it might be nice to have a small survey about how many people would actually use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Build-System Related to build systems or continuous integration X-Contentious There are nontrivial implications that should be thought through

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants